package es.uclm.itsue.video;

import android.app.Activity;
import android.os.Bundle;
import android.widget.MediaController;
import android.widget.VideoView;

public class ItsueVideoActivity extends Activity {
	
	 VideoView vv;
     MediaController mc;
    
    @Override
    public void onCreate(Bundle savedInstanceState) {
    	
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        vv = (VideoView) findViewById(R.id.videoView1);
        mc = new MediaController(this);
        
        mc.setMediaPlayer(vv);
        vv.setMediaController(mc);
        
        vv.setVideoPath("/data/ERDR.mp4");   
//        vv.setVideoPath("/data/ERDR.3gp");   
        vv.requestFocus();
        vv.start();
        
    }
    
    public void onPause() 
    { 
    	super.onPause();
    	vv.stopPlayback(); 
    } 

    public void onResume()
    { 
    	super.onResume();
    	vv.start();
    } 
    
}